package com.sysu.simulation.bean;

public class Clothes {
    private static final String[] materialNames = {"棉","尼龙","丙纶","涤纶","毛织"};
    private static final String[] thicknessNames = {"薄","中","厚"};
    private static final String[] typeNames = {"背心","短袖","长袖","短裤","中裤","长裤"};

    public enum Material {Cotton, Nylon, Polypropylene, Polyester, Wool;
        @Override
        public String toString() {
            return materialNames[ordinal()];
        }
    }

    public enum Thickness {Thin, Mid, Thick;
        @Override
        public String toString() {
            return thicknessNames[ordinal()];
        }
    }

    public enum Type {Upper_S, Upper_M, Upper_L, Under_S, Under_M, Under_L;
        @Override
        public String toString() {
            return typeNames[ordinal()];
        }
    }

    private String title;
    private int material;
    private int thickness;
    private int type;

    public Clothes() {

    }

    public Clothes(String title, Material material, Thickness thickness, Type type) {
        this.title = title;
        this.material = material.ordinal();
        this.thickness = thickness.ordinal();
        this.type = type.ordinal();
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setMaterial(Material material) {
        this.material = material.ordinal();
    }

    public void setThickness(Thickness thickness) {
        this.thickness = thickness.ordinal();
    }

    public void setType(Type type) {
        this.type = type.ordinal();
    }

    public String getTitle() {
        return title;
    }

    public Material getMaterial() {
        return Material.values()[material];
    }

    public Thickness getThickness() {
        return Thickness.values()[thickness];
    }

    public Type getType() {
        return Type.values()[type];
    }
}
